<div class="list-content">
    <div class="title-content">
        <div class="title-name">
            <h2>
                <img src="<?php echo base_url("public/template/frontend/images") ?>/title-pro.png" alt="title">
                GIỎ HÀNG
            </h2>
            <span>Hiện có <?php echo $this->cart->total_items();?> sản phẩm</span>
        </div>                                                      
    </div><!--title-content-->
    <div class="clear-both"></div>
    <div class="main-content">
        <?php if($this->cart->total_items() !=0){?>
        <form action="<?php echo base_url("frontend/cart/update");?>" method="post">
            <table class="shopping">
                <tr>
                    <th>Hình ảnh</th>
                    <th>Tên sản phẩm</th>                                        
                    <th>Số lượng</th>
                    <th>Thành tiền</th>
                    <th>Xóa</th>
                </tr>
                <?php
                $i = 1;
                foreach($items as $items){
                ?>
                <input type="hidden" name="<?php echo $i;?>[rowid]" value="<?php echo $items['rowid'];?>" >
                <tr>
                    <td class="thumps">
                        <a href="#"><img src="<?php echo base_url($items['options']['img']) ?>"></a>
                    </td>
                    <td class="info">
                        <a href="#"><?php echo $items['name'];?></a><br>
                        <span>Kích thước: <?php echo $items['options']['size'];?> cm</span><br>
                        <span>Màu: <?php echo isset($items['options']['color'])?$items['options']['color']:'Mặc định';?></span><br>
                        <span>Thêm: <?php echo isset($items['options']['bonus'])?$items['options']['bonus']:'Không có';?></span><br>
                        <span>Giá: <?php echo number_format($items['price']);?>đ</span>

                    </td>
                    <td class="qty">
                        <input type="text" name="<?php echo $i;?>[qty]" value="<?php echo $items['qty'];?>">
                    </td>
                    <td class="price">
                        <span><?php echo number_format($items['subtotal']);?> đ</span>
                    </td>
                    <td class="remove">
                        <a href="<?php echo base_url("frontend/cart/delete").'/'.$items['rowid'];?>">Xóa</a>
                    </td>
                </tr>
                <?php
                $i++;
                }
                ?>                                    
                <tr>
                    <td colspan="6" class="total" >TỔNG TIỀN: <span><?php echo $this->cart->format_number($this->cart->total()); ?> đ</span></td>
                </tr>
                <tr>
                    <td colspan="6" class="check-out">
                        <a href="<?php echo base_url("frontend/product");?>">Tiếp tục mua hàng</a>
                        <input type="submit" name="update" value="Cập nhật">
                        <a href="<?php echo base_url("frontend/cart/payment");?>">Thanh toán</a>
                        <a href="<?php echo base_url("frontend/cart/deleteAll");?>">Xóa giỏ hàng</a>
                    </td>
                </tr>
            </table>
        </form>
        <?php
        }
        else{
        ?>
        <h2 style="float: left; margin-top: 15px;">Hiện không có sản phẩm trong giỏ hàng</h2>
        <?php
        }
        ?>
    </div><!--main-content-->                        
</div><!--list-content-->